feat(preprod): Add grace period before failing status check for missing base#115448
Merged
Conversation
…ng base
When a head snapshot uploads before its base build, the status check
previously posted an immediate FAILURE to GitHub. Now it posts
IN_PROGRESS ("Waiting for base snapshots...") and schedules a delayed
timeout task (10 minutes). If the base arrives before the timeout, the
existing comparison flow re-triggers the status check which runs the
normal path. If not, the timeout flips it to FAILURE.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mypy inferred the dict values as `object` because it holds two different task types, causing an "object not callable" error at the call site. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rbro112
approved these changes
May 12, 2026
This was referenced May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a head snapshot uploads before its base build (e.g., due to network timing), the status check task immediately posts a FAILURE to GitHub with "No base snapshots found." This is a false negative — the base just hasn't arrived yet.
This adds a grace period: instead of failing immediately, the task posts an IN_PROGRESS status ("Waiting for base snapshots...") and schedules a delayed self-invocation (10 minutes). If the base arrives before the timeout, the existing comparison flow re-triggers the status check which takes the normal path — the timeout task becomes a harmless no-op. If the base never arrives, the timeout flips it to FAILURE.
The approach is event-driven rather than poll-based: no retries, no new state to maintain. The task re-runs the same idempotent logic and queries the DB for current truth.
Companion to #115446 which adds the matching "Waiting for base" UI state in the frontend.